/*******************************************************************************
 * CopyRight (c) 2020 
 *
 * \file    mp4.h
 * \brief   mp4 format option
 * \author  ZhangJing
 * \version 1.0.0
 * \date    2020-07-02
 *
 * -----------------------------------------------------------------------------
 *
 * -----------------------------------------------------------------------------
 * Modify History：
 * <Date>       | <Version> | <Author>  | <Discribe>
 * 2020-07-02   | v1.0.0    | ZhangJing | Create file
 * -----------------------------------------------------------------------------
 ******************************************************************************/

#ifndef _MP4__H
#define _MP4__H

#include "publicdef.h"

typedef struct BoxStsc {
    int first_chunk;
    int count_per_chunk;
    int sample_id;
} BoxStsc;

typedef struct Mp4Stream {
    int chunk_count;    /**< packets count */
    int *chunk_offsets; /**< packets offset address */
    int sample_count;   /**< packets count */
    int *sample_sizes;  /**< packets size */
    int stsc_count;
    BoxStsc *stsc_data; /**< sample describe with chunk */
    int pps_data_len;
    unsigned char *pps_data; /**< pps data in box minf/stbl/stsd/hvc1 */
} Mp4Stream;

#endif /* _MP4__H */
